package Java0106;

import java.util.Random;

public class Java02 {
    public static void main(String[] args) {
        //(2)随机数类 java.util.Random
        char[] arr = {'你','他','a','b','x','y'};
        Random rand = new Random();
        for (int i = 0; i < 4; i++) {
            //   生成一个随机整数↓
            int r = rand.nextInt(arr.length);
            System.out.println(arr[r]);

        }

    }

}
